<?php
class CMSException
{

	public $message;
	public $errCode;

	public function __construct($errCode,$message)
	{
		$this->errCode = $errCode;
		$this->message = $message;
	}

	public function getArray()
	{
		return array('errCode'=>$this->errCode,'message'=>$this->message);
	}

	public static $ok;
	public static $linkErr;
	public static $loginErr;
	public static $infoErr;
	public static $addModelErr;
	public static $deleteColumnErr;
}


CMSException::$ok      = (new CMSException('0','正常'))->getArray();
CMSException::$linkErr = (new CMSException('1045','数据库连接失败'))->getArray();
CMSException::$loginErr= (new CMSException('1','用户名或者密码错误'))->getArray();
CMSException::$infoErr = (new CMSException('2','必须输入框为空'))->getArray();
CMSException::$addModelErr = (new CMSException('3','添加模板出错'))->getArray();
CMSException::$deleteColumnErr = (new CMSException('4','删除栏目出错'))->getArray();

?>